.title-bar {
  position: relative; /* 为定位子元素提供参照 */
  height: 45px;
  display: flex;
  align-items: center;
  padding: 0;
  -webkit-app-region: drag;
  user-select: none;
  overflow: hidden; /* 防止内容溢出 */

  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid #d9d9d9;
  border-left: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
}

.title-bar-left,
.title-bar-right {
  height: 45px;
  line-height: 45px;
}
.title-bar-left {
  float: left;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(221, 228, 234, 0.9);
}
.title-bar-left img {
  margin-left: 10px;
}

.title-bar-right {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: flex-end;
  background-color: white;
}
.title-bar-right .right-btn-panel {
  display: flex;
  justify-content: right;
}

.title-bar .title-bar-left {
  width: 10%;
  transition: width 0.1s ease;
}
.title-bar .title-bar-right {
  width: 90%;
  transition: width 0.1s ease;
}
.title-bar.side-bar-show .title-bar-left {
  width: 20%;
}
.title-bar.side-bar-show .title-bar-right {
  width: 80%;
}

.title-bar .icon {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  -webkit-app-region: drag;
  user-select: none;
}

.title-bar .title {
  flex-grow: 1;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-app-region: drag;
  color: #151717;
  font-size: 13px;
  margin-top: -2px;
}

.title-bar .operating-button {
  width: 15px;
  height: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-app-region: no-drag;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
  border-radius: 50%;
  background-color: var(--button-bg);
  margin-right: 8px;
}

.title-bar .operating-button img {
  width: 10px;
  height: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.title-bar .operating-button:hover img {
  opacity: 1;
}

.title-bar .close-button {
  --button-bg: #f56057;
}

.title-bar .minimum-button {
  --button-bg: #fec428;
}

.title-bar .expand-button {
  --button-bg: #1fd42a;
}

.toggle-sidebar {
  float: left;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 4px;
  -webkit-app-region: no-drag;
  transition: background-color 0.3s;
}

.toggle-sidebar:hover {
  /* background-color: rgba(0, 0, 0, 0.06); */
}

.toggle-sidebar img {
  width: 26px;
  height: 26px;
}
